
<div id="banner">
    <div id="user">
        <div id="user-acc">
            <?php

            if ($_SESSION['username']) {
                echo "<div id='hello'>
                <p>Hello : <a href='#'>$_SESSION[username]</a><br/><br/><a class='button' href='account.php?do=logout'><span>Log out</span></a></div>
                ";
            } else {
                include 'web/form.login.phtml';
            }
            ?>
        </div>
        <div id="user-cart">
            <?php
            if ($_SESSION['cart']&&$_SESSION['username']) {
                $cart = $_SESSION['cart'];
                echo "<h3>Cart</h3>";
                $pr = 0;
                $qu = 0;
                foreach ($cart as $key => $value) {
                    $pr ++;
                    $qu =$qu + $value; 
                }
                echo "Product: $pr <br/>
                      Quantity: $qu <br/>
                        ";
            }
            ?>
            <a class='button' href="#"><span>View Cart</span></a>
        </div>
    </div>
    <div id="img"></div>
</div>